-------------------------------------------
Fairweather Cosmopolitans, Replication File 
July 9, 2024
-------------------------------------------

# Scripts ---------------------------------------

1) cleaning and merging.Rmd
	- Merges in country-level variables
	- Recodes individual-level variables
	- Creates "wvs_latam.csv" and "wvs_all.csv"

2) main_analysis.Rmd
	- Runs main regression models  
	- Creates Figures 1-5 and Table 1

3) supplemental info.Rmd
	- Creates Figures and Tables in Supplemental Info


# Data Files ------------------------------------- 
                                
Global Migration Data.dta - Global migration data 
                       
more_country_vars.dta -  Additional country-level variables (unemp, pop, ln, ln_gdp, growth)                                                                                                    

un_data_gdp_cap.csv - UN GDP per capita data                     

WVS_Cross-National_Wave_7_Stata_v5_0.dta - Original WVS Wave 7 Data 

wvs_all.csv - Cleaned WVS Data with all available countries                            

wvs_latam.csv - Cleaned WVS Data with only available Latin American Countries 


# R Packages and Session Info -----------------------------

R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Mexico.utf8  LC_CTYPE=Spanish_Mexico.utf8    LC_MONETARY=Spanish_Mexico.utf8
[4] LC_NUMERIC=C                    LC_TIME=Spanish_Mexico.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] conflicted_1.2.0       Hmisc_5.1-0            ggcorrplot_0.1.4.1     psych_2.3.3            here_1.0.1            
 [6] ggrepel_0.9.3          dotwhisker_0.7.4       texreg_1.38.6          readxl_1.4.2           countrycode_1.4.0     
[11] ggsci_3.0.0            ggpubr_0.6.0           marginaleffects_0.12.0 huxtable_5.5.2         knitr_1.43            
[16] janitor_2.2.0          xtable_1.8-4           lmerTest_3.1-3         lme4_1.1-33            Matrix_1.5-4.1        
[21] haven_2.5.2            lubridate_1.9.2        forcats_1.0.0          stringr_1.5.0          dplyr_1.1.2           
[26] purrr_1.0.1            readr_2.1.4            tidyr_1.3.0            tibble_3.2.1           ggplot2_3.5.0         
[31] tidyverse_2.0.0        pacman_0.5.1    


 





